#include<bits/stdc++.h>
using namespace std;
int read(){
	int x=0;
	char ch=getchar();
	while(ch<'0'||ch>'9')ch=getchar();
	while(ch>='0'&&ch<='9')x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
	return x;
}
const int N=1000010;
int n,k;
double d[N];
bool cmp(double i,double j){
	return i>j;
}
double pf[N],sf[N],pg[N],sg[N];
int main(){
	freopen("sleep.in","r",stdin);
	freopen("sleep.out","w",stdout);
    n=read(),k=read();
    for(int i=1;i<=n;i++){
        int a=read(),b=read();
        d[i]=1.0*a/b;
    }
    sort(d+1,d+n+1,cmp);
    pf[0]=sf[0]=1;
    for(int i=1;i<=n;i++){
        pf[i]=pf[i-1]*d[i];
        sf[i]=sf[i-1]-(sf[i-1]-pf[i-1])*d[i];
    }
    pg[n+1]=sg[n+1]=1;
    for(int i=n;i>=1;i--){
        pg[i]=pg[i+1]*(1-d[i]);
        sg[i]=sg[i+1]-(sg[i+1]-pg[i+1])*(1-d[i]);
    }
    double ans=0;
    for(int i=k,j=n+1;i>=0;i--,j--)ans=max(ans,sf[i]*pg[j]+pf[i]*sg[j]-pf[i]*pg[j]);
    cout<<fixed<<setprecision(9)<<1-ans<<'\n';
	return 0;
}

